<!DOCTYPE html>
<!--
    This file is part of Resumer
    Copyright (C) 2016  Sylvia van Os

    Resumer is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
<html lang="en">
    <head>
        <title>R&eacute;sum&eacute;r</title>
        <link rel="stylesheet" type="text/css" href="templates/common.css">
        <link rel="stylesheet" type="text/css" href="templates/report.css">
    </head>
    <body>
    {% autoescape %}
        <div id="content">
            <div class="container">
                <h1>{{ name }}</h1>
                <div class="left">
                    <h2>Services</h2>
                </div>
                <div class="right">
                    <ul>
                    {% for service in services %}
                        <li>{{ service.name }}: <a href="{{ service.url }}" target="_blank">{{ service.username }}</a></li>
                    {% endfor %}
                    </ul>
                </div>
            </div>

            {% if repositories is empty %}
                <div class="container">
                    <div class="right">
                        <p><em>This user hasn't done anything yet. There is only silence...</em></p>
                    </div>
                </div>
            {% else %}
                <div class="container">
                    <div class="left">
                        <h2>Languages</h2>
                    </div>
                    <div class="right">
                        <ul class="twocolumn">
                        {% for language in languages|sort %}
                            <li>{{ language.name }} ({{ (language.count / repositories|length * 100)|round }}%)</li>
                        {% endfor %}
                        </ul>
                    </div>
                </div>

                <div class="container">
                    <div class="left">
                        <h2>Popular Repositories</h2>
                    </div>
                    <div class="right">
                        {% for repo in repositories[0:5] %}
                            <div class="container">
                                <div class="date">{{ repo.created.year }}{% if repo.created.year != repo.updated.year %} - {{ repo.updated.year }}{% endif %}</div>
                                <h3 class="repotitle">{{ repo.name }}</h3>
                                <small>{{ repo.language }} - <a href="{{ repo.repo }}" target="_blank">Repository</a>{% if repo.homepage %} - <a href="{{ repo.homepage }}" target="_blank">Homepage</a>{% endif %}</small>
                                <p>{{ repo.description }}</p>
                                <ul class="threecolumn">
                                    <li>{{ repo.stars }} stars</li>
                                    <li>{{ repo.watchers }} watchers</li>
                                    <li>{{ repo.forks }} forks</li>
                                </ul>
                            </div>
                        {% endfor %}
                    </div>
                </div>
            {% endif %}

            <div class="container">
                <div class="left">
                    <h2>About</h2>
                </div>
                <div class="right">
                    <p>
                        This overview was automatically generated by
                        <a href="source.html">R&eacute;sum&eacute;r</a>, the
                        Free as in Freedom r&eacute;sum&eacute; generator.
                    </p>
                </div>
            </div>
        </div>
        {% endautoescape %}
    </body>
</html>
